new Vue({
    el:'#main-container',
    data:{
        demand:{}
    },
    methods:{
        doUpdate:function () {
            axios({
                url: '/manager/demand/saveOrUpdate',
                method: 'post',
                data: this.demand
            }).then(response=>{
                parent.layer.msg(response.data.msg); //通过父窗口layer对象弹框
                let index = parent.layer.getFrameIndex(window.name);//先得到当前iframe层的索引
                //关闭当前子窗口
                parent.layer.close(index);
            })
        }
    },
    created: function () {
        this.demand = parent.layer.demand;
    }
});